<?php
/**
 * user model
 */
class Model_Commentor_User extends Model_Base
{
        /**
     * table name
     * must be set within each object
     *
     * @access protected
     */
    protected $tableName = 'users';


    /**
     * unique id
     * must be set within each object
     *
     * @access protected
     */
    protected $keys = 'id';

    /**
     * the internal data KEY array
     * used for internal objects/values attached to this object
     * MUST BE SET BEFORE HAND
     *
     * @format array['name' => 'type']
     * @access protected
     * @var    array
     */
    protected $internalVars = array(
       'username' => 'str',
       'ip' => 'str',
       'web' => 'str',
       'active' => 'str',
       'attributes' => 'text',
    );


    /**
     * the external data KEY array
     * used for external objects/values attached to this object
     * so it doesn't ruin the rawData which will be used to save into db
     * IT STORES ONLY THE KEYS - SO WHEN USING GETRAWDATA, THESE ARE EXEMPTED
     * MUST BE SET BEFORE HAND
     *
     * @format array['name' => 'type']
     * @access protected
     * @var    array
     */
    protected $externalVars = array(
    );


/*--------------------------------------[getters]--------------------------------------*/

    /**
     * get username: uname
     *
     * @return str
     */
    public function getUsername()
    {
        return $this->_getVar('username');

    }// end getUsername


    /**
     * get ip: ip address
     *
     * @return str
     */
    public function getIp()
    {
        return $this->_getVar('ip');

    }// end getIp


    /**
     * get web: web url
     *
     * @return str
     */
    public function getWeb()
    {
        return $this->_getVar('web');

    }// end getWeb


    /**
     * get active: Y|N
     *
     * @return str
     */
    public function getActive()
    {
        return $this->_getVar('active') == 'Y';

    }// end getActive


    /**
     * get attributes: reserved for future use
     *
     * @return text
     */
    public function getAttributes()
    {
        return $this->_getVar('attributes');

    }// end getAttributes


/*--------------------------------------[setters]--------------------------------------*/

    /**
     * set username
     *
     * @param str $Username uname
     *
     * @return Default_Model_Users
     */
    public function setUsername($Username)
    {
        return $this->_setVar('username', $Username);

    }// end setUsername


    /**
     * set ip
     *
     * @param str $Ip ip address
     *
     * @return Default_Model_Users
     */
    public function setIp($Ip)
    {
        return $this->_setVar('ip', $Ip);

    }// end setIp


    /**
     * set web
     *
     * @param str $Web web url
     *
     * @return Default_Model_Users
     */
    public function setWeb($Web)
    {
        return $this->_setVar('web', $Web);

    }// end setWeb


    /**
     * set active
     *
     * @param str $Active Y|N
     *
     * @return Default_Model_Users
     */
    public function setActive($Active)
    {
        $Active = $Active? 'Y' : 'N';
        return $this->_setVar('active', $Active);

    }// end setActive


    /**
     * set attributes
     *
     * @param text $Attributes reserved for future use
     *
     * @return Default_Model_Users
     */
    public function setAttributes($Attributes)
    {
        return $this->_setVar('attributes', $Attributes);

    }// end setAttributes


/*--------------------------------------[special function]--------------------------------------*/

}// end Model_Commentor_User
?>